{% extends 'base.html' %}
{% block body %}
    <div class="panel-heading" >
        <ul id="myTab" class="nav nav-tabs">
        <li class="active">
            <a href="#ShelloCode" data-toggle="tab" style="color: rgb(255, 140, 60);">
                ShelloCode
            </a>
        </li>
        <li><a href="#instructions" data-toggle="tab" style="color: rgb(0, 138, 0);">
            使用说明</a>
        </li>
        </ul>

        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="ShelloCode">
                <form action="/create_loader" method="post" role="form">
                    {% csrf_token %}
                    <br>

                    <div class="col-sm-2 control-label">
                        <label for="lastname" class="col-sm-2 control-label"></label>
                        <br><br><label for="lastname" class="col-sm-2 control-label"></label>
                        <span class="glyphicon glyphicon-fire" style="font-size: 100px; color:  rgb(255, 140, 60);"> </span>

                    </div>

                    <div class="col-sm-10">
                        <textarea style="height:160px;width:700px;" class="form-control" rows="3" name="shellCode" placeholder="请输入ShelloCode" ></textarea>
                    </div>
                    <br><br><br><br><br><br><br><br><br>
                    <label for="lastname" class="col-sm-2 control-label"></label>
                    <label for="lastname" class="col-sm-2 control-label"></label>

                    <div class="center" >
                    <table ><tr>
                        <td style="text-align:center;vertical-align:middle;">
                            <div class="input-group input-group-sm" style="float:left;">
                                <span class="input-group-addon">N</span>
                                <input type="text" style="width:120px;" class="form-control" name="number" placeholder="加密次数">
                            </div>
                        </td>

                        <td > </td>
                        <td>
                        <span class="glyphicon glyphicon-tint" style="color: rgb(252,140,61);"> </span>
                            <span class="glyphicon glyphicon-tint" style="color: rgb(255,140,60);"> </span>
                            <span class="glyphicon glyphicon-tint" style="color: rgb(255,140,60);"> </span>
                        </td>

                        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>

                        <td>
                            <div class="input-group input-group-sm" style="width:180px;">
                                <span class="input-group-addon">打包方式</span>
                                <select class="form-control" name="packaging">
                                    <option value="Pyinstaller">Pyinstaller</option>
{#                                    <option value="Py2exe">Py2exe</option>#}
                                </select>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td> <br></td>
                    </tr>

                    <tr>
                        <td></td>
                        <td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td> <button type="submit" class="btn btn-primary">提交</button> </td>
                    </tr>

                    </table>
                </div>

                </form>
            </div>

            <div class="tab-pane fade" id="instructions">
                <h4>AVByPass 在线自动免杀平台使用说明</h4>

                <blockquote><ul>
                  <li class="text-primary">ShellCode</li>
                    &nbsp;&nbsp;&nbsp;&nbsp; 输入如CobaltStrike生成的python版payload.py文件中的buf
                    = "xxxxx" 的 xxxxx
                  <li class="text-success">加密次数</li>
                    &nbsp;&nbsp;&nbsp;&nbsp; 通过简单的修改加密次数来绕过360不断网的情况下，免杀效果只有一会的情况
                    <li class="text-primary">打包方式</li>
                    &nbsp;&nbsp;&nbsp;&nbsp; 目前只支持Pyinstaller一种打包方式，需要其他打包方式的可通过修改index.html的58行和shellcode目录下
                    的views.py的65行，增加自己的打包方式

                </ul></blockquote>
            </div>


            <br>
        </div>
    </div>


    {% if messages %}
        {% for msg in messages %}
             <div id="myAlert" class="alert alert-success">
                 <a href="#" class="close" data-dismiss="alert">&times;</a>
                 <strong>{{ msg }}</strong>
             </div>
        {% endfor %}
            <script>
            $(function(){
                $(".close").click(function(){
                    $("#myAlert").alert();
                    $("#myAlert2").alert();
                });
            });
            </script>

    {% endif %}

    <div class="panel-heading" id="result">
        <ul id="myTab" class="nav nav-tabs">
        <li class="active">
            <a href="#ShelloCodeList" data-toggle="tab" style="color: rgb(10, 97, 255);">
                ShelloCodeList
            </a>
        </li>
        </ul>

        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="ShelloCodeList"><br>
            <div class="text-center" id="ShelloCodeList">
                <div>
                    <table class="table table-striped">
                        <thead><tr>
{#                            <th style="text-align:center;vertical-align:middle;">ID</th>#}
                            <th style="text-align:center;vertical-align:middle;">HASH</th>
                            <th style="text-align:center;vertical-align:middle;">PUB_DATE</th>
                            <th style="text-align:center;vertical-align:middle;">NUMBER</th>
                            <th style="text-align:center;vertical-align:middle;">DOWNLOAD_FILE</th>
                            <th style="text-align:center;vertical-align:middle;">DELETE</th>
                        </tr></thead>
                        <tbody>
                        {% for shellcode in current_page %}
                        <tr>
{#                            <td style="text-align:center;vertical-align:middle;">{{ shellcode.id }}</td>#}
                            <td style="text-align:center;vertical-align:middle;"><a href="/get_code?uuid={{ shellcode.hash_md5 }}" target="_blank">{{ shellcode.hash_md5 }}</a></td>
                            <td style="text-align:center;vertical-align:middle;">{{ shellcode.pub_date }}</td>
                            <td style="text-align:center;vertical-align:middle;">{{ shellcode.number }}</td>
                            <td style="text-align:center;vertical-align:middle;">
                                <a href="/download?filename={{ shellcode.filename }}" class="btn btn-info btn-lg" style="font-size: 10px;">
                                <span class="glyphicon glyphicon-download-alt"></span> 点击下载Loader
                                </a>
                            </td>
                            <td style="text-align:center;vertical-align:middle;">
                                <a href="/delete_shellcode?uuid={{ shellcode.hash_md5 }}" class="btn btn-danger" style="font-size: 10px;">
                                <span class="glyphicon glyphicon-remove"></span> DEL
                                </a>
                            </td>
                        </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>

                <nav aria-label="Page navigation">
                    <ul class="pagination pagination-lg">

                    {% if current_page.has_previous %}
                        <li>
                            <a href="?page={{ current_page.previous_page_number }}" aria-label="Previous">
                                <span aria-hidden="true">上一页</span>
                            </a>
                        </li>
                    {% else %}
                    <li class="disabled">
                        <a href="" aria-label="Previous">
                            <span aria-hidden="true">上一页</span>
                        </a>
                    </li>

                    {% endif %}

                    {% for item in page_range %}
                        {% if current_page_num == item %}
                            <li class="active"><a href="?page={{ item }}">{{ item }}</a></li>
                        {% else %}
                            <li><a href="?page={{ item }}">{{ item }}</a></li>
                        {% endif %}
                    {% endfor %}

                    {% if current_page.has_next %}
                        <li>
                            <a href="?page={{ current_page.next_page_number }}" aria-label="Next">
                                <span aria-hidden="true">下一页</span>
                            </a>
                        </li>
                    {% else %}
                    <li class="disabled">
                        <a href="" aria-label="Next">
                            <span aria-hidden="true">下一页</span>
                        </a>
                    </li>
                    {% endif %}
                    </ul>
                </nav>

            </div>
        </div>
    </div>
    </div>
{% endblock %}
